home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
gnulib
/
sun4.md
/
_builtin_New.s
< prev
next >
Wrap
Text File
|
1990-03-06
|
2KB
|
80 lines
.seg "text" ! [internal]
.proc 66
.global ___builtin_vec_new
___builtin_vec_new:
!#PROLOGUE# 0
!#PROLOGUE# 1
save %sp,-96,%sp
tst %i0
bne L77003
add %i1,1,%i5
mov %i2,%o1
call .mul,2
mov %i5,%o0
call ___builtin_new,1
nop
mov %o0,%i0
L77003:
mov 0,%i1
cmp %i1,%i5
bge L77007
mov %i0,%i4
LY1: ! [internal]
mov %i0,%o0
mov %i3,%g1
call %g1,1
inc %i1
cmp %i1,%i5
bl LY1
add %i0,%i2,%i0
L77007:
ret
restore %g0,%i4,%o0
.proc 592
.global ___set_new_handler
___set_new_handler:
tst %o0
sethi %hi(___new_handler),%o3
bne L77012
ld [%o3+%lo(___new_handler)],%o5
sethi %hi(_default_new_handler),%o1
add %o1,%lo(_default_new_handler),%o0
L77012:
sethi %hi(___new_handler),%o2
st %o0,[%o2+%lo(___new_handler)]
retl
add %g0,%o5,%o0
.proc 592
.global _set_new_handler
_set_new_handler:
!#PROLOGUE# 0
!#PROLOGUE# 1
save %sp,-96,%sp
call ___set_new_handler,1
mov %i0,%o0
ret
restore %g0,%o0,%o0
.proc 16
_default_new_handler:
!#PROLOGUE# 0
!#PROLOGUE# 1
save %sp,-96,%sp
sethi %hi(L41),%o1
or %o1,%lo(L41),%o1 ! [internal]
mov 2,%o0
call _write,3
mov 65,%o2
call __exit,1
mov -1,%o0
ret
restore
.seg "data" ! [internal]
.align 4
.global ___new_handler
___new_handler:
.word _default_new_handler
.seg "data1" ! [internal]
L41:
.ascii "default_new_handler: out of memory... aaaiiiiiieeeeeeeee"
.ascii "eeeee!\n\0"